<template>
  <div class="center-overview-num-item">
    <div v-if="unitText" class="center-overview-num-item-img">
      <img src="../assets/images/center-overview-unit-bg.png">
      <div class="center-overview-num-item-img-unit">{{ unitText }}</div>
    </div>
    <div class="center-overview-num-item-content">
      <div class="center-overview-num-item-title">{{ title }}</div>
      <div class="center-overview-num-item-num">
        <div class="center-overview-num-item-num-title">
          {{ title1 || 0 }}
        </div>
        <div class="center-overview-num-item-num-content">{{ num1 || 0 }}</div>
        <div class="center-overview-num-item-num-unit">{{ unit1 || 0 }}</div>
      </div>
      <div class="center-overview-num-item-num">
        <div class="center-overview-num-item-num-title">
          {{ title2 || 0 }}
        </div>
        <div class="center-overview-num-item-num-content">{{ num2 || 0 }}</div>
        <div class="center-overview-num-item-num-unit">{{ unit2 || 0 }}</div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  props: {
    unitText: String,
    title: String,

    title1: String,
    num1: Number,
    unit1: String,

    title2: String,
    num2: Number,
    unit2: String
  }
}
</script>
<style lang="scss">
.center-overview-num-item {
  display: flex;
  align-items: center;
  &-img {
    margin-right: 5px;
    position: relative;

    &-unit {
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -65%);
      font-size: 18px;
      font-family: YouSheBiaoTiHei;
      font-weight: 400;
      color: #ffffff;
    }
  }

  &-title {
    font-size: 16px;
    font-family: PingFang SC;
    margin-bottom: 5px;
    color: #fff;
    font-weight: bold;
  }

  &-num {
    align-items: flex-end;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
    &-title{
      font-size: 14px;
      font-family: PingFang SC;
      font-weight: bold;
      color: #afecff;
      margin-right: 5px;
    }
    &-content {
      font-size: 14px;
      font-family: FontName;
      font-weight: 400;
      color: #47e6de;
    }

    &-unit {
      font-size: 12px;
      font-family: PingFang SC;
      font-weight: bold;
      color: #afecff;
      margin-left: 5px;
    }
  }
}
</style>
